Las industrias creativas y culturales, lo que se conoce como Economía Naranja, es el conjunto de actividades que de manera encadenada, permiten que las ideas se transformen en bienes y servicios, cuyo valor puede estar basado en la propiedad intelectual.

La Economía Naranja tiene el talento y la creatividad como insumo principal y es capaz de generar empleo, riqueza y tener un impacto en la calidad de vida.

Comprende entre otras, la industria del arte, arquitectura, cine, diseño, publicidad, televisión, editorial, el teatro, la animación, los videos juegos, la música, la moda, la gastronomía, las artesanías, el turismo y patrimonio cultural.

Empezemos creando un resumen de las variables a analizar y su explicación.

orangeec <- read.csv("./data/orangeec.csv", header = TRUE, sep =",")
#data("orangeec")
summary(orangeec)
##       Country       GDP.PC       GDP.US.bill         GDP.Growth..  
##  Argentina: 1   Min.   : 5600   Min.   :     13.7   Min.   :0.800  
##  Belize   : 1   1st Qu.: 8300   1st Qu.:     37.1   1st Qu.:2.000  
##  Bolivia  : 1   Median :13300   Median :     75.7   Median :2.800  
##  Brazil   : 1   Mean   :14053   Mean   : 188693.0   Mean   :2.959  
##  Chile    : 1   3rd Qu.:19900   3rd Qu.:    309.2   3rd Qu.:4.200  
##  Colombia : 1   Max.   :25400   Max.   :2055000.0   Max.   :5.400  
##  (Other)  :11                                                      
##  Services...GDP  Creat.Ind...GDP   Inflation       Unemployment   
##  Min.   :50.00   Min.   :1.000   Min.   : 0.400   Min.   : 2.300  
##  1st Qu.:56.90   1st Qu.:2.000   1st Qu.: 1.600   1st Qu.: 5.500  
##  Median :62.20   Median :2.600   Median : 3.400   Median : 6.700  
##  Mean   :62.64   Mean   :3.291   Mean   : 4.365   Mean   : 6.794  
##  3rd Qu.:64.90   3rd Qu.:3.950   3rd Qu.: 4.300   3rd Qu.: 8.100  
##  Max.   :82.00   Max.   :7.400   Max.   :25.700   Max.   :11.800  
##                  NA's   :6                                        
##  X..pop.below.poverty.line Internet.penetration...population   Median.age   
##  Min.   : 4.20             Min.   :38.20                     Min.   :22.10  
##  1st Qu.:21.70             1st Qu.:57.70                     1st Qu.:25.70  
##  Median :25.70             Median :69.70                     Median :28.20  
##  Mean   :27.65             Mean   :68.42                     Mean   :28.28  
##  3rd Qu.:32.70             3rd Qu.:79.90                     3rd Qu.:31.30  
##  Max.   :59.30             Max.   :93.10                     Max.   :35.00  
##                                                                             
##   X..pop.25.54   Education.invest...GDP
##  Min.   :34.12   Min.   :2.800         
##  1st Qu.:39.23   1st Qu.:4.400         
##  Median :40.19   Median :5.000         
##  Mean   :39.88   Mean   :5.082         
##  3rd Qu.:41.08   3rd Qu.:5.900         
##  Max.   :44.03   Max.   :7.400         
## 

Country: País, seleccione 17 países para llevar a cabo el estudio
-Argentina
-Belize
-Bolivia
-Brasil
-Chile
-Colombia
-Costa Rica
-Ecuador
-El Salvador
-Guatemala
-Honduras
-México
-Nicaragua
-Panamá
-Paraguay
-Perú
-Uruguay

GDP.PC:PIB per Capita

GDP US bill: PIB en dolares

GDP Growth %: Crecimiento del PIB en el último año (2019)

Services % GDP: Porcentaje del PIB proveniente de servicios

Creat Ind %GDP: Porcentaje del PIB proveniente de las industrias creativas

Inflation: Inflación

Unemployment: Tasa de desempleo

% pop below poverty line: Porcentaje de la población por debajo de la línea de pobreza

Internet penetration % population: Penetración de internet en la población

Median Age: Edad media

% pop 25-54: Porcentaje de la población entre 25 y 54 años

Education invest % GDP: Porcentaje del PIB invertido en investigación y educación

Empezamos buscando posibles correlaciones en los datos

newdata <- subset(orangeec, select = c(5,6,10,11,12,13))
pairs(orangeec[,2:6])

pairs(orangeec[,5:10])

pairs(newdata)

cor(orangeec[,2:6], use = "complete.obs")
##                      GDP.PC GDP.US.bill GDP.Growth.. Services...GDP
## GDP.PC           1.00000000 -0.04987362    0.1186869      0.6437520
## GDP.US.bill     -0.04987362  1.00000000   -0.5254890      0.2552986
## GDP.Growth..     0.11868685 -0.52548898    1.0000000      0.2552048
## Services...GDP   0.64375196  0.25529859    0.2552048      1.0000000
## Creat.Ind...GDP  0.26063277  0.24218479    0.3124484      0.2201699
##                 Creat.Ind...GDP
## GDP.PC                0.2606328
## GDP.US.bill           0.2421848
## GDP.Growth..          0.3124484
## Services...GDP        0.2201699
## Creat.Ind...GDP       1.0000000
cor(orangeec[,5:10], use = "complete.obs")
##                                   Services...GDP Creat.Ind...GDP  Inflation
## Services...GDP                         1.0000000       0.2201699 -0.1985176
## Creat.Ind...GDP                        0.2201699       1.0000000  0.1189514
## Inflation                             -0.1985176       0.1189514  1.0000000
## Unemployment                           0.1770322      -0.4188541  0.1418000
## X..pop.below.poverty.line             -0.2534107       0.7072581  0.1702550
## Internet.penetration...population     -0.1453060      -0.3435164  0.4459355
##                                   Unemployment X..pop.below.poverty.line
## Services...GDP                      0.17703222                -0.2534107
## Creat.Ind...GDP                    -0.41885405                 0.7072581
## Inflation                           0.14179995                 0.1702550
## Unemployment                        1.00000000                -0.5693572
## X..pop.below.poverty.line          -0.56935718                 1.0000000
## Internet.penetration...population  -0.02534538                -0.3080290
##                                   Internet.penetration...population
## Services...GDP                                          -0.14530602
## Creat.Ind...GDP                                         -0.34351645
## Inflation                                                0.44593550
## Unemployment                                            -0.02534538
## X..pop.below.poverty.line                               -0.30802896
## Internet.penetration...population                        1.00000000
cor(newdata, use = "complete.obs")
##                                   Services...GDP Creat.Ind...GDP
## Services...GDP                       1.000000000       0.2201699
## Creat.Ind...GDP                      0.220169925       1.0000000
## Internet.penetration...population   -0.145306022      -0.3435164
## Median.age                           0.356375194      -0.4412121
## X..pop.25.54                         0.338980318      -0.1306267
## Education.invest...GDP              -0.003218743      -0.1598673
##                                   Internet.penetration...population Median.age
## Services...GDP                                           -0.1453060  0.3563752
## Creat.Ind...GDP                                          -0.3435164 -0.4412121
## Internet.penetration...population                         1.0000000  0.3581014
## Median.age                                                0.3581014  1.0000000
## X..pop.25.54                                             -0.1824810  0.2667101
## Education.invest...GDP                                    0.4355714  0.2168221
##                                   X..pop.25.54 Education.invest...GDP
## Services...GDP                       0.3389803           -0.003218743
## Creat.Ind...GDP                     -0.1306267           -0.159867273
## Internet.penetration...population   -0.1824810            0.435571370
## Median.age                           0.2667101            0.216822054
## X..pop.25.54                         1.0000000            0.531343612
## Education.invest...GDP               0.5313436            1.000000000

Realizamos estadisticas descriptivas de los datos

library(ggplot2)
ggplot()+geom_histogram(data=orangeec,aes(x=GDP.PC), fill = "blue", color="red", binwidth = 2000) + labs(x = "PIB per capita", y = "Cantidad de paises", title = "PIB per capita paises LATAM") + theme(panel.background = element_blank(), panel.grid.major =  element_blank(), panel.grid.minor = element_blank())

ggplot()+geom_histogram(data=orangeec,aes(x=Internet.penetration...population), fill = "blue", color ="yellow", binwidth = 5) +  labs(x = "Penetración internet (%) población", y = "Cantidad de paises", title = "Penetración internet en países LATAM") + theme(panel.background = element_blank(), panel.grid.major =  element_blank(), panel.grid.minor = element_blank())

ggplot()+geom_histogram(data=orangeec,aes(x=Creat.Ind...GDP), fill = "blue", color="red", binwidth = 1) +  labs(x = "Aporte economia naranja al PIB (%)", y = "Cantidad de paises", title = "Contribucion Economia Naraja en LATAM") + theme(panel.background = element_blank(), panel.grid.major =  element_blank(), panel.grid.minor = element_blank())
## Warning: Removed 6 rows containing non-finite values (stat_bin).

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
economy <- mean(orangeec$GDP.PC)
orangeec <- orangeec %>% mutate(Strong_economy = ifelse(GDP.PC<economy,"Por debajo promedio PIB per capita","Sobre promedio PIB per capita"))


ggplot(orangeec, aes(x=Strong_economy, y = Creat.Ind...GDP,fill=Strong_economy)) + geom_boxplot(alpha = 0.4) + labs(x="Tipo de pais", y="Aporte economia naranja al PIB", title =  "Aporte economia naranja en PIB paises LATAM con alto y bajo PIB per capita") + theme(panel.background = element_blank(), panel.grid.major =  element_blank(), panel.grid.minor = element_blank())
## Warning: Removed 6 rows containing non-finite values (stat_boxplot).

ggplot(orangeec, aes(x=Strong_economy, y = Internet.penetration...population,fill=Strong_economy)) + geom_boxplot(alpha = 0.4) + labs(x="Tipo de pais", y="Penetracion de Internet (%)", title = "Penetracion de internet en paises LATAM con alto y bajo PIB per capita") + theme(panel.background = element_blank(), panel.grid.major =  element_blank(), panel.grid.minor = element_blank())

El Boxplot indica que los paises sobre el promedio en PIB per cápita tienen una dispersión mucho mas alta en cuanto a los aportes de la economía naranja al PIB del país.

Asi como la dispersión del acceso a internet es mas notable en los paises que estan por debajo del promedio en PIB per cápita.

Crearemos algunos scatters plots para entender mejor las relaciones entre las variables.

library("plotly")
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
ggplot(orangeec,aes(Internet.penetration...population,Creat.Ind...GDP))+geom_point(aes(color = factor(Strong_economy), size = GDP.Growth..)) + labs(x="Penetracion de internet", y = "Aporte Orange Economy al PIB ", title = "Internet y aporte orange economy según economia crecimiento PIB")
## Warning: Removed 6 rows containing missing values (geom_point).

ggplot(orangeec,aes(Education.invest...GDP,Unemployment))+geom_point(aes(color = factor(Strong_economy), size = X..pop.below.poverty.line)) + labs(x="Inversion en educacion (%) PIB", y = "Desempleo", title = "Inversion en educacion y desempleo según linea de pobreza y crecimiento PIB")

my_graph <- ggplot(orangeec, aes(Internet.penetration...population, Creat.Ind...GDP, label = row.names(orangeec))) +  geom_point() + labs(x = "Penetracion Internet", y = "Aporte economia naranja", title = "Penetracion Internet y aporte economia naranja")

p = ggplotly(my_graph)
p
library("RColorBrewer")

# Ajustando datos para mejores visualizaciones

orangeec <- orangeec %>% 
  mutate(Crecimiento_GDP = ifelse(GDP.Growth.. >= 2.5, "2.5 % o mas", "menos de 2.5 %"))

orangeec <- orangeec %>% 
  mutate(Anaranjados = ifelse(Creat.Ind...GDP > 2.5,
                              "Mas anaranjados",
                              "Menos anaranjados"))

#Ranking

orangeec %>% 
  arrange(desc(Creat.Ind...GDP))
##        Country GDP.PC GDP.US.bill GDP.Growth.. Services...GDP Creat.Ind...GDP
## 1       Mexico  19900   1149000.0          2.0           64.0             7.4
## 2       Panama  25400        61.8          5.4           82.0             6.3
## 3     Paraguay   9800        29.6          4.3           54.5             4.1
## 4    Argentina  20900       637.7          2.9           60.9             3.8
## 5     Colombia  14500       309.2          1.8           61.4             3.3
## 6       Brazil  15600   2055000.0          1.0           72.8             2.6
## 7        Chile  24500       277.0          1.5           64.3             2.2
## 8   Costa Rica  16900        58.1          3.2           73.5             2.0
## 9      Ecuador  11500       102.3          2.7           56.9             2.0
## 10        Peru  13300       215.2          2.5           56.8             1.5
## 11     Uruguay  22400        58.4          3.1           68.8             1.0
## 12      Belize   8300      1854.0          0.8           62.2              NA
## 13     Bolivia   7500        37.1          4.2           50.0              NA
## 14 El Salvador   8900        28.0          2.4           64.9              NA
## 15   Guatemala   8100        75.7          2.8           63.2              NA
## 16    Honduras   5600        22.9          4.8           57.8              NA
## 17   Nicaragua   5800        13.7          4.9           50.8              NA
##    Inflation Unemployment X..pop.below.poverty.line
## 1        6.0          3.6                      46.2
## 2        0.9          5.5                      23.0
## 3        3.6          6.5                      22.2
## 4       25.7          8.1                      25.7
## 5        4.3         10.5                      28.0
## 6        3.4         11.8                       4.2
## 7        2.2          7.0                      14.4
## 8        1.6          8.1                      21.7
## 9        0.4          4.6                      21.5
## 10       2.8          6.7                      22.7
## 11       6.2          7.3                       9.7
## 12       1.1         10.1                      41.0
## 13       2.8          4.0                      38.6
## 14       1.0          7.0                      32.7
## 15       4.4          2.3                      59.3
## 16       3.9          5.9                      29.6
## 17       3.9          6.5                      29.6
##    Internet.penetration...population Median.age X..pop.25.54
## 1                               65.0       28.3        40.81
## 2                               69.7       29.2        40.35
## 3                               89.6       28.2        41.08
## 4                               93.1       31.7        39.38
## 5                               63.2       30.0        41.91
## 6                               70.7       32.0        43.86
## 7                               77.5       34.4        43.08
## 8                               86.7       31.3        44.03
## 9                               79.9       27.7        39.59
## 10                              67.6       28.0        40.19
## 11                              88.2       35.0        39.34
## 12                              52.3       22.7        36.62
## 13                              78.6       24.3        37.48
## 14                              57.7       27.1        39.23
## 15                              42.1       22.1        34.12
## 16                              38.2       23.0        36.63
## 17                              43.0       25.7        40.24
##    Education.invest...GDP                     Strong_economy Crecimiento_GDP
## 1                     5.3      Sobre promedio PIB per capita  menos de 2.5 %
## 2                     3.2      Sobre promedio PIB per capita     2.5 % o mas
## 3                     5.0 Por debajo promedio PIB per capita     2.5 % o mas
## 4                     5.9      Sobre promedio PIB per capita     2.5 % o mas
## 5                     4.5      Sobre promedio PIB per capita  menos de 2.5 %
## 6                     5.9      Sobre promedio PIB per capita  menos de 2.5 %
## 7                     4.9      Sobre promedio PIB per capita  menos de 2.5 %
## 8                     7.1      Sobre promedio PIB per capita     2.5 % o mas
## 9                     5.0 Por debajo promedio PIB per capita     2.5 % o mas
## 10                    3.8 Por debajo promedio PIB per capita     2.5 % o mas
## 11                    4.4      Sobre promedio PIB per capita     2.5 % o mas
## 12                    7.4 Por debajo promedio PIB per capita  menos de 2.5 %
## 13                    7.3 Por debajo promedio PIB per capita     2.5 % o mas
## 14                    3.5 Por debajo promedio PIB per capita  menos de 2.5 %
## 15                    2.8 Por debajo promedio PIB per capita     2.5 % o mas
## 16                    5.9 Por debajo promedio PIB per capita     2.5 % o mas
## 17                    4.5 Por debajo promedio PIB per capita     2.5 % o mas
##          Anaranjados
## 1    Mas anaranjados
## 2    Mas anaranjados
## 3    Mas anaranjados
## 4    Mas anaranjados
## 5    Mas anaranjados
## 6    Mas anaranjados
## 7  Menos anaranjados
## 8  Menos anaranjados
## 9  Menos anaranjados
## 10 Menos anaranjados
## 11 Menos anaranjados
## 12              <NA>
## 13              <NA>
## 14              <NA>
## 15              <NA>
## 16              <NA>
## 17              <NA>
TopNaranjas <- orangeec %>% filter(Country %in% c("Mexico","Panama","Paraguay","Argentina","Colombia","Brazil"))

TopNaranjas %>%
  arrange(desc(Creat.Ind...GDP))
##     Country GDP.PC GDP.US.bill GDP.Growth.. Services...GDP Creat.Ind...GDP
## 1    Mexico  19900   1149000.0          2.0           64.0             7.4
## 2    Panama  25400        61.8          5.4           82.0             6.3
## 3  Paraguay   9800        29.6          4.3           54.5             4.1
## 4 Argentina  20900       637.7          2.9           60.9             3.8
## 5  Colombia  14500       309.2          1.8           61.4             3.3
## 6    Brazil  15600   2055000.0          1.0           72.8             2.6
##   Inflation Unemployment X..pop.below.poverty.line
## 1       6.0          3.6                      46.2
## 2       0.9          5.5                      23.0
## 3       3.6          6.5                      22.2
## 4      25.7          8.1                      25.7
## 5       4.3         10.5                      28.0
## 6       3.4         11.8                       4.2
##   Internet.penetration...population Median.age X..pop.25.54
## 1                              65.0       28.3        40.81
## 2                              69.7       29.2        40.35
## 3                              89.6       28.2        41.08
## 4                              93.1       31.7        39.38
## 5                              63.2       30.0        41.91
## 6                              70.7       32.0        43.86
##   Education.invest...GDP                     Strong_economy Crecimiento_GDP
## 1                    5.3      Sobre promedio PIB per capita  menos de 2.5 %
## 2                    3.2      Sobre promedio PIB per capita     2.5 % o mas
## 3                    5.0 Por debajo promedio PIB per capita     2.5 % o mas
## 4                    5.9      Sobre promedio PIB per capita     2.5 % o mas
## 5                    4.5      Sobre promedio PIB per capita  menos de 2.5 %
## 6                    5.9      Sobre promedio PIB per capita  menos de 2.5 %
##       Anaranjados
## 1 Mas anaranjados
## 2 Mas anaranjados
## 3 Mas anaranjados
## 4 Mas anaranjados
## 5 Mas anaranjados
## 6 Mas anaranjados
ggplot(TopNaranjas, aes(x = Internet.penetration...population, y = Services...GDP, size = GDP.PC))+
  geom_point() +
  facet_wrap(~Country)

ggplot(TopNaranjas, aes(x = Education.invest...GDP, y = Creat.Ind...GDP, size = Unemployment))+
  geom_point() +
  facet_wrap(~Country)

myColors <- brewer.pal(6,"Reds")

ggplot(TopNaranjas, aes(x = Internet.penetration...population, y = GDP.PC, fill = Creat.Ind...GDP))+
  geom_tile() +
  facet_wrap(~Country) +
  scale_fill_gradientn(colors = myColors)

Con este análisis exploratorio podemos observar a mayor profundidad las relaciones entre las variables y procedere a concretar en análisis estadistico